﻿using Microsoft.Extensions.DependencyInjection;
using Mozhi.Abp.Module.DataLinkage.Repositories;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.Modularity;

namespace Mozhi.Abp.Module.DataLinkage.EntityFrameworkCore;

[DependsOn(
    typeof(DataLinkageDomainModule),
    typeof(AbpEntityFrameworkCoreModule)
)]
public class DataLinkageEntityFrameworkCoreModule : AbpModule
{
    public override void ConfigureServices(ServiceConfigurationContext context)
    {
        context.Services.AddAbpDbContext<DataLinkageDbContext>(options =>
        {
            /* Add custom repositories here. Example:
             * options.AddRepository<Question, EfCoreQuestionRepository>();
             */
            context.Services.AddAbpDbContext<DataLinkageDbContext>(options =>
            {
                options.AddRepository<DataLinkage, DataLinkageRepository>();
            });
        });
    }
}
